STEP 13: Using the information we have in our function, let's use logic to figure out if our animal is a reptile.

not flips a boolean. For example, not True becomes False and not False becomes True.

  • From , drag if and inside and to the bottom of classify_animal().
  • Change choice1 == "yes" to has_scales and choice2 == "no" to not eggs_in_water.
  • Finally, in , drag String Variable indented inside the if statement.

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)